package newsAction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

import filmsDao.StudentDao;
import newsDao.NewsDao;

public class lookNews extends  ActionSupport{
	private HttpServletRequest request;
    private String message="input";
    public String execute() throws Exception{
        request=ServletActionContext.getRequest();
        NewsDao dao=new NewsDao();
        List list=dao.findAllNews();
        request.getSession().setAttribute("count", list.size());
        request.getSession().setAttribute("allInfo1", list);
        message="success";
        return message;
    }
}
